Term of the Moment

information superhighway


Look Up Another Term


Definition: pigeonhole sort


A sorting technique that is used when the range of keys is relatively small. An array of pigeonholes (buckets, chunks of RAM) is reserved for each possible key value. The records from the unsorted list are scanned and copied into their respective pigeonholes based on their key values. Then, the contents of the pigeonholes are copied in sequence to the final destination. See sort algorithm.




Pigeonhole Sort and Counting Sort
In the first pass, after copying the records into their appropriate pigeonholes based on key values, the data wind up sorted. The "counting sort" method is an alternate technique that uses an array of counters based on key values. The values in the counters are used to rearrange the data (see counting sort).